﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI.TraCuu_Update
{
    public partial class SachFrm : Form
    {
        UserControl _sach;

        public SachFrm(Action<DTO.DauSachDTO> callback)
        {
            InitializeComponent();
            _sach = new GUI.TraCuu_Update.SachGUI(false,callback);
        }

        private void SachFrm_Load(object sender, EventArgs e)
        {
            pnl_Main.Controls.Clear();
            pnl_Main.Controls.Add(_sach);
        }

        public void SetCallback(Action<DTO.DauSachDTO> callback)
        {
            (_sach as GUI.TraCuu_Update.SachGUI).SetCallback(callback);
        }
    }
}
